package gat.common.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum IndexLightTypeEnum {

    publish("publish", "发布了【合作】"),
    openVip("openVip", "开通了【会员】"),
    renewVip("renewVip", "续费了【会员】"),
    buyProp("buyProp", "购买了【道具】"),
    publishGuarantee("publishGuarantee", "发布了【平台交易】");


    private String code;

    private String value;

    @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
    public static IndexLightTypeEnum getByCode(@JsonProperty("code") String code) {
        for (IndexLightTypeEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

}
